<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo (C("SYS_TITLE")); ?></title>
<link href="/wwyl/Public/Admin/css/style.css" rel="stylesheet" type="text/css" />
<link href="/wwyl/Public/Admin/css/page.css" rel="stylesheet" type="text/css" />
<style>
.file {width:102px;height:34px;opacity:0;filter:alpha(opacity=0);cursor:pointer;}
<!--权限样式-->
#wrap a{text-decoration:none; color:#000;}
#wrap a:hover{ color:#CCC;}
#wrap{ width:94%; height:auto; overflow:hidden; margin:20px auto; padding:10px 20px; border:1px solid #ccc;}
#wrap .add-app{ display:block; width:100px; height:20px; line-height:20px; text-align:center; background:#670768; color:#fff; border-radius:4px;}
#wrap .app{ padding:5px; border:1px solid #f6f6f6; border-radius:4px; width:1000px;}
#wrap .app p{ height:20px; line-height:20px;}
#wrap .app p strong{ font-size:20px; color:#0b99d8}
#wrap .app dl{ margin:10px 0; border:1px solid #f6f6f6; height:auto; overflow:hidden;border-radius:4px;}
#wrap .app dl dt{ display:block; height:25px; line-height:25px; background:#e6e6fa; text-indent:25px;}
#wrap .app dl dt strong{ font-size:14px; color:#61a1fa;}
#wrap .app dl dd{ margin:5px; display:block; height:18px;; width:185px; line-height:18px; text-align:left;  float:left; font-size:16px;} 
</style>

<!--编辑器-->
<script type="text/javascript" src="/wwyl/Public/Admin/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/wwyl/Public/Admin/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/wwyl/Public/Admin/ueditor/ueditor.all.min.js"></script>

<!---->
<script language="JavaScript" src="/wwyl/Public/Admin/js/jquery.js"></script>
<script type="text/javascript">
	$(function(){	
		//顶部导航切换
		$(".nav li a").click(function(){
			$(".nav li a.selected").removeClass("selected")
			$(this).addClass("selected");
		})	
	})	
	
	$(function(){	
		//导航切换
		$(".menuson li").click(function(){
			$(".menuson li.active").removeClass("active")
			$(this).addClass("active");
		});
		
		$('.title').click(function(){
			var $ul = $(this).next('ul');
			$('dd').find('ul').slideUp();
			if($ul.is(':visible')){
				$(this).next('ul').slideUp();
			}else{
				$(this).next('ul').slideDown();
			}
		});
	})	
	
	$(document).ready(function(){
	  $(".click").click(function(){
	  $(".tip").fadeIn(200);
	  });
	  
	  $(".tiptop a").click(function(){
	  $(".tip").fadeOut(200);
	});
	
	  $(".sure").click(function(){
	  $(".tip").fadeOut(100);
	});
	
	  $(".cancel").click(function(){
	  $(".tip").fadeOut(100);
	});
	
	});
	
	//tabl 切换
	$(document).ready(function(e) {
		$('#sel li').click(function(){
			$(".tab-front").removeClass("tab-front").addClass("tab-back");
			$('#sel li a').removeClass();	
			$(this).find('a').attr('class','selected');
			$(this).removeClass("tab-back").addClass("tab-front");
			var i = $(this).index();
			$(".tabbody-div").hide();
			$(".tabbody-div").eq(i).show();
		});
	});
</script>

</head>

<link rel="stylesheet" type="text/css" href="/wwyl/Public/Admin/css/style.css">
<!--编辑器-->
<script type="text/javascript" src="/wwyl/Public/Admin/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/wwyl/Public/Admin/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/wwyl/Public/Admin/ueditor/ueditor.all.min.js"></script>
<script type="text/javascript">
  $(document).ready(function(e) {
    $('#sel li').click(function(){
      $(".tab-front").removeClass("tab-front").addClass("tab-back");
      $('#sel li a').removeClass(); 
      $(this).find('a').attr('class','selected');
      $(this).removeClass("tab-back").addClass("tab-front");
      var i = $(this).index();
      $(".tabbody-div").hide();
      $(".tabbody-div").eq(i).show();
    });
  });

</script>
<body>
<form action="<?php echo U('Article/addDo');?>" method="post" enctype="multipart/form-data">
  <div class="formbody">
    <div class="formtitle">
      <div class="itab">
        <ul id='sel'>
          <li class="tab-front"><a class="selected" style="cursor:pointer;">基本信息</a></li>
          <li class="tab-back"><a class="" style="cursor:pointer;">SEO信息</a></li>
          <li class="tab-back"><a class="" style="cursor:pointer;">附属信息</a></li>
        </ul>
      </div>
    </div>
    <ul class="forminfo">
      <div class="tabbody-div">
        <li>
          <label>文章标题</label>
          <input name="name" type="text" class="dfinput" />
          <i>标题不能超过300个字符</i></li>
        <li>
          <label>分类选项</label>
          <select id='cid' name="cid"style="width:347px; height:34px; border:1px solid #CED9DF; line-height:34px;">
            <option value="0">请选择一个分类</option>
            	<?php if(is_array($cate)): foreach($cate as $key=>$v): ?><option value="<?php echo ($v['id']); ?>">
                    	<?php if($v['pid'] != 0): echo ($v['html']); endif; echo ($v['name']); ?>
                    </option><?php endforeach; endif; ?>
          </select>
          <i>请选择一个分类</i> </li>
        
        <li>
        <label></label>
            <div style="margin-left:85px;" id="selectCid">
            	<!--
                <?php if(is_array($cattr)): foreach($cattr as $key=>$v): ?><div style="margin-bottom:5px;">
                        <a><?php echo ($v['name']); ?>:&nbsp;</a>
                            <?php if(is_array($v['child'])): foreach($v['child'] as $key=>$vo): ?><input name="aid[]" type="checkbox" value="<?php echo ($vo['id']); ?>" />
                                &nbsp;<?php echo ($vo['name']); ?>&nbsp;&nbsp;&nbsp;&nbsp;<?php endforeach; endif; ?>
                        <br/>            
                    </div><?php endforeach; endif; ?>
                -->
            </div>
        </li> 
       
        <?php if( $attr != '' ): ?><li>
        	<label>标签选项</label>
            <div style="margin-left:85px; margin:20px auto; " id="selectCid">
                <?php if(is_array($attr)): foreach($attr as $key=>$v): ?><span style="width:120px; height:20px; line-height:20px; text-align:left; float:left;">
                    <input name="tag_id[]" type="checkbox" value="<?php echo ($v['id']); ?>" style=" margin-top:5px;"/>
                    &nbsp;<a style="color:<?php echo ($v['color']); ?>;"><?php echo ($v['name']); ?></a>  
                    </span><?php endforeach; endif; ?>               
            </div>
        </li><?php endif; ?>
         
        <li>
          <label>文章内容</label>
          <textarea id="content" cols="" rows="" name="content" style="margin-left:85px;"></textarea>
          <script type="text/javascript">
       		//把textarea替换成一个编辑器
        	UE.getEditor('content',{
                initialFrameWidth:700,
                initialFrameHeight:300,
            });
          </script> 
        </li>
      </div>
      <div class="tabbody-div" style="display:none;">
        <li>
          <label>SEO标题</label>
          <input name="title" type="text" class="dfinput" />
          <i>seo标题不能超过300个字符</i></li>
        <li>
          <label>SEO关键字</label>
          <input name="keywords" type="text" class="dfinput" />
          <i>多个关键字用 ， 隔开 ， 不能超过400个字符</i></li>
        <li>
          <label>SEO描述</label>
          <textarea name="description" cols="" rows="" class="textinput"></textarea>
          <i>描述不能超过500个字符</i></li>
      </div>
      <div class="tabbody-div" style="display:none;"> 
        <li>
          <label>缩略图</label>
          <input type="file" name="pic" value="上传图片"/>
          <i>上传的图片请不要大于 1MB</i>
        </li>
        <li>
          <label>文章属性</label>
          <i> <cite>
          <div style="float:left; margin-right:1px;">
            <input name="xing" type="radio" value="0" checked="checked"/>
            &nbsp;
            无需属性 </div>
          <div style="float:left; margin-right:15px;">
            <input name="xing" type="radio" value="1" />
            &nbsp; <img src="/wwyl/Public/Admin/xing/x1.gif">【推荐】 </div>
          <div style="float:left; margin-right:15px;">
            <input name="xing" type="radio" value="2" />
            &nbsp; <img src="/wwyl/Public/Admin/xing/x2.gif">【最新】 </div>
          <div style="float:left; margin-right:15px;">
            <input name="xing" type="radio" value="3" />
            &nbsp; <img src="/wwyl/Public/Admin/xing/x3.gif">【置顶】 </div>
          <div style="float:left; margin-right:15px;">
            <input name="xing" type="radio" value="4" />
            &nbsp; <img src="/wwyl/Public/Admin/xing/x4.gif">【头条】 </div>
          <div style="float:left; margin-right:15px;">
            <input name="xing" type="radio" value="5" />
            &nbsp; <img src="/wwyl/Public/Admin/xing/x5.gif">【前排】 </div>
          </cite> </i> </li>
          
        <li>
          <label>审核选项</label>
          <cite>
          <input name="lock" type="radio" value="1" checked="checked"/>
          无需审核 &nbsp;&nbsp;&nbsp;&nbsp;
          <input name="lock" type="radio" value="0" />
          需要审核 &nbsp;&nbsp;&nbsp;&nbsp;    
          </cite> </li>
        <li>
          <label>评论选项</label>
          <cite>
          <input name="comment" type="radio" value="1" checked="checked"/>
          允许评论 &nbsp;&nbsp;&nbsp;&nbsp;
          <input name="comment" type="radio" value="0" />
          禁止评论 &nbsp;&nbsp;&nbsp;&nbsp;    
          </cite> </li>          
        <li>
          <label>浏览量</label>
          <input type="text" name="num" value="" class="dfinput">
          <i>浏览量不能超过6位的整数</i> </li>
        <li>
          <label>作者</label>
          <input type="text" name="doc" value="<?php echo $_SESSION['session_username']?>" class="dfinput">
          <i>作者不能超过50个字符</i> </li>
        <li>
          <label>文章来源</label>
          <input type="text" name="url" value="" class="dfinput">
          <i>请加上 http:// 协议！不能超过50个字符</i> </li>
        <li>
          <label>文章摘要</label>
          <textarea id="remark" cols="" rows="" name ="remark" style="margin-left:85px;"></textarea>
          <script type="text/javascript">
			//把textarea替换成一个编辑器
			UE.getEditor('remark',{
					initialFrameWidth:750,
					initialFrameHeight:100,
				});
			</script> 
        </li>
      </div>

      <li>
        <label>&nbsp;</label>
        <input name="time" type="hidden" value=<?php echo time();?>>
        <input name="" type="submit" class="btn" value="确认保存"/>
      </li>
    </ul>
  </div>
</form>
</body>
</html>